perm filename LECT13.TEX[ARK,TEX] blob
sn#766839 filedate 1984-08-23 generic text, type C, neo UTF8
COMMENT ⊗ VALID 00003 PAGES
C REC PAGE DESCRIPTION
C00001 00001
C00002 00002 % copyright 1984 by Arthur Keller ... All rights reserved
C00008 00003 \section*{Assignment}
C00010 ENDMK
C⊗;
% copyright 1984 by Arthur Keller ... All rights reserved
\chapter{Mathematics: Displayed Equations}
%Thu, August 23
%9-10am
%Mathematics: Displayed Equations
%>in-line vs. displayed equations
%>shilling vs. built-up fractions
%10-11am
%<lab assignment 9>
Displayed equations are appropriate when you want to typeset expressions
which are too tall to fit well inside an ordinary paragraph.
(If you try to set such an expression inside normal math mode, it will
force \TeX\ to increase the interline spacing for some but not all of the
lines of the paragraph, which looks bad.)
They are also for long formulas which would be hard to read when run in
with the text of a paragraph, or for expressions which you do not want
broken across lines.
Finally, display math mode can be used to emphasize important formulas
(which often will be numbered, which is only possible in display math
mode).
Display math mode works pretty much like ordinary math mode, except that
it begins and ends with two dollar signs rather than one.
Expressions typed inside display math mode come out centered on the width
of the page, with some extra space above and below.
For example, if we type \mm{\$x\caret 2 - y\caret 2 = (x + y)(x - y)\$},
the result will be $$x↑2-y↑2=(x+y)(x-y)$$.
If we wanted an equation number, we specify it after the command
\cmd{eqno}, {\it before} the dollar signs which end display math mode.
One use of display math mode is to typeset expressions where there are
discrete cases for the value of a variable.
For example, we could have $$x =\cases{1 &if $n$ is even\cr 0 &if $n$ is
odd\cr}$$ which is typeset by saying
\par\smallskip{\tt\obeycr\noindent%
\$\$x=\bs cases\lb1\&if \$n\$ is even\bs cr
\leavevmode\hphantom{\$\$x=\bs cases\lb}0\&if \$n\$ is odd\bs cr\rb\$\$
}
\smallskip\noindent
that this looks very much like an \cmd{tabset} alignment (actually, it is
closer to an \cmd{halign}), except that the template has been pre-defined
for you.
However, there is one very tricky aspect to the \cmd{cases} command which
can cause endless problems if you are not aware of it.
Notice that the words ``if $n$ is even'' and ``if $n$ is odd'' came out in
roman type, even though they're inside of a mode which normally causes
letters to come out in italics.
This is because, for each case, everything after the {\tt\&} is enclosed
in an \cmd{hbox}, thus taking it out of display math mode.
The {\it problem} comes when the cases involve an expression like $x>0$ or
$x\times y>\sqrt z$.
If you type {\tt x>0} as part of the right-hand size of a case expression,
you will get x>0.
Notice that the `x' is roman and that the `{\tt >}' has come out as `>'.
This is because the character in the `{\tt >}' position of the ordinary
\cmd{rm} font is `>'.
If you type {\tt x\cmd{times}\ y\cmd{sqrt}\lb z\rb}, you will get an error
message indicating that a {\tt \$} (to get into math mode) was missing
when \TeX\ tried to set the \cmd{times} command, and an error message
indicating that a {\tt\$} (to get out of math mode) was missing when \TeX\
reached the \cmd{cr}.
Consequently, remember that if you want to use mathematical expressions in
the right-hand side of a \cmd{case} command, you have to use {\tt \$}s to
get back into math mode.
\section*{Assignment}
Reading for this lecture:
The {\sl \TeX book}, Chapters~18--19.
Assignment for this lecture:
Typeset the following.
\noindent
A better way to write $ x↑2 + y↑2 \over 2$ inside a sentence is $(x↑2 +
y↑2)/2$.
\medskip
\noindent
However, in display mode, it's OK to say $$ x = {k+1 \over k+2} $$ .
$$ {n \choose k} + {n \choose k+1} = {n+1 \choose k+1} $$
$$ \sum_{n=0}↑\infty{nx}↑2 $$
\noindent
How much wood could a wood chuck chuck if he could chuck three cords of
wood in $\int_{100}↑{250} 2x\,dx$ hours?
$$ \left(a↑2\over 2\right) + \left(b↑3 \over 3\right)$$
\noindent
The formula $\int_0↑{\infty}{{a+b\over c+d}+{{(\tan y}↑2)}↑5\over29}\,dy$
looks much better as a display:
$$ \int_0↑{\infty}{{a+b\over c+d}+{{(\tan y}↑2)}↑5\over29}\,dy $$